package com.xxx.service;

import com.xxx.pojo.Account;

/**
 * @version v1.0
 * @Description:
 * @Author zhanzhongxin
 * @Date 2021/7/16 9:27
 * @Copyright 博为峰
 */
public class SavingAccount extends Account {

    public SavingAccount() {
    }

    public SavingAccount(String cardNo, String password, double balance) {
        super(cardNo, password, balance);
    }

    @Override
    public void deposit(double money) {
        double balance = this.getBalance();
        balance -= money;
        this.setBalance(balance);
    }
}
